//
//  LKDeseaseTypeCell.m
//  QuickCure
//
//  Created by 胡不归是大虾 on 9/12/16.
//  Copyright © 2016 haoge. All rights reserved.
//

#import "LKDeseaseTypeCell.h"
@interface LKDeseaseTypeCell( )

@property(nonatomic,weak) UILabel* deseaseTypeLabel;
@property(nonatomic,weak) UILabel* chooseLabel;




@end
@implementation LKDeseaseTypeCell

- (void)awakeFromNib {
    [super awakeFromNib];

}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setUpMyUI];
    }
    return self;
}

-(void)setUpMyUI
{
    UILabel* deseaseTypeLabel = [[UILabel alloc] init];
    self.deseaseTypeLabel = deseaseTypeLabel;
    [self.contentView addSubview:deseaseTypeLabel];
    //设置约束
    [deseaseTypeLabel makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView).offset(15);
        make.top.equalTo(self.contentView).offset(15);
    }];
    //设置内容
    UIImageView* arrowImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"jt"]];
    self.accessoryView = arrowImageView;
    //
    UILabel* chooseLable = [[UILabel alloc] init];
    self.chooseLabel = chooseLable;
    [self.contentView addSubview:chooseLable];
    chooseLable.textAlignment = NSTextAlignmentRight;
    //设置约束
    [chooseLable makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.deseaseTypeLabel.top);
        make.right.equalTo(self.contentView).offset(-35);
        make.width.equalTo(150);
    }];
    //设置内容
    chooseLable.text = @"请选择";
    chooseLable.textColor = [UIColor lightGrayColor];
}
-(void)setTag:(NSInteger)tag
{
    [super setTag:tag];
    if (self.tag == 0) {
        self.deseaseTypeLabel.text = @"疾病类型:";
    }else
    {
        self.deseaseTypeLabel.text = @"疾病细分:";
    }
}
-(void)setDesType:(NSString *)desType
{
    _desType = desType;
    if (self.tag == 0) {
            self.chooseLabel.text = desType;
    }
}
-(void)setBasType:(NSString *)basType
{
    _basType = basType;
    if (self.tag == 1) {
        self.chooseLabel.text = basType;
    }
}



@end
